<?php include _include(ADMIN_PATH.'view/htm/header.inc.htm');?>
<div class="row">
	<div class="col-lg-10 offset-lg-1">
		<div class="card">
			<div class="card-block">
				<h4 class="card-title"><?php echo $header['title'];?></h4>
				<form action="<?php echo url("plugin-setting-ss_ads-edit-$_id");?>" method="post" id="form">
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">名称：</label>
						<div class="col-sm-10">
							<?php echo $input['name'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">模式：</label>
						<div class="col-sm-10">
							<?php echo $input['mode'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">尺寸：</label>
						<div class="col-sm-10">
							<?php echo $input['size'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">成立展示：</label>
						<div class="col-sm-10">
							<?php echo $input['lcode'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label">不成立展示：</label>
						<div class="col-sm-10">
							<?php echo $input['rcode'];?>
						</div>
					</div>
					<div class="form-group row">
						<label class="col-sm-2 form-control-label"></label>
						<div class="col-sm-10">
							<button type="submit" class="btn btn-primary btn-block" id="submit" data-loading-text="<?php echo lang('submiting');?>..."><?php echo lang('confirm');?></button>
							<a role="button" class="btn btn-secondary btn-block m-t-1" href="javascript:history.back();"><?php echo lang('back');?></a>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>

<!--{hook admin_user_update_end.htm}-->

<?php include _include(ADMIN_PATH.'view/htm/footer.inc.htm');?>


<script>
var jform = $('#form');
var jsubmit = $('#submit');
jform.on('submit', function() {
	jform.reset();
	jsubmit.button('loading');
	var postdata = jform.serialize();
	$.xpost(jform.attr('action'), postdata, function(code, message) {
		if(code == 0) {
			$.alert(message);
			jsubmit.text(message).delay(3000).button('reset');
		} else if(code < 0) {
			$.alert(message);
			jsubmit.button('reset');
		} else {
			$.alert(message);
			jform.find('[name="'+code+'"]').alert(message).focus();
			jsubmit.button('reset');
		}
	});
	return false;
});
</script>